﻿/*
 * @Autor: PK
 * @Date: 2022/01/03 10:40:SS
 */

using System.ComponentModel;
using System.Runtime.CompilerServices;
using PropertyChanged;
using ShkSimulation.desktop.Annotations;

namespace ShkSimulation.desktop.setting.tools {

	[AddINotifyPropertyChangedInterface]
	public record SystemConfig : AutoSaveConfig {
		
		public event PropertyChangedEventHandler PropertyChanged;

		public bool 自动初始化 { get; set; }
		public bool 重置不再提醒 { get; set; }
		public bool 编辑后保存不再提醒 { get; set; }
		public bool 编辑后取消不再提醒 { get; set; }
		public bool 性能统计 { get; set; }
		public string IP地址 { get; set; }
		public string 端口 { get; set; }
		public string 数据库名 { get; set; }
		public string 用户名 { get; set; }
		public string 密码 { get; set; }

		public bool IsSetValid() {
			return true;
		}

		[NotifyPropertyChangedInvocator]
		protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) {
			PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
		}

	}
}